{extend name="public/base" /}

{block name="title"}{$cateinfo.catename} - {taoler:name /}{/block}
{block name="keywords"}{$cateinfo.catename},{taoler:name /}{/block}
{block name="description"}{$cateinfo.desc}{/block}
{block name="ogtitle"}<meta property="og:title" content="{$cateinfo.catename} - {taoler:name /}">{/block}
{block name="ogdescription"}<meta property="og:description" content="{$cateinfo.desc}" />{/block}
{block name="meta"}
	<!-- SEO优化 -->
	<meta name="copyright" content="{taoler:copyright /}">
	<meta property="og:type" content="website"/>
	<meta property="og:image" content=""/>
{/block}
{block name="column"}{include file="/public/column" /}{/block}

{block name="content"}
<div class="layui-container article-content">
	<div class="layui-row layui-col-space15">
		<div class="layui-col-md8">
			<div class="fly-panel" style="margin-bottom: 0;">
				<div class="layui-tab layui-tab-card" style="margin-top: 0px;">
					<ul class="layui-tab-title">
					<li {if condition="$Request.param.type eq 'all'" } class="layui-this" {/if}><a href="{:url('cate_type',['ename' => $Request.param.ename,'type' => 'all'])} "  >{:lang('all')}</a></li>
					<li {if condition="$Request.param.type eq 'end'" } class="layui-this" {/if}><a href="{:url('cate_type',['ename' => $Request.param.ename,'type' => 'end'])} ">{:lang('end')}</a></li>
					<li {if condition="$Request.param.type eq 'wait'" } class="layui-this" {/if}><a href="{:url('cate_type',['ename' => $Request.param.ename,'type' => 'wait',])}">{:lang('未解决')}</a>	</li>
					</ul>
				</div>
				<ul class="question-list">
					{article:list}
					<li>
						{if ($article.flags.is_wait == 1)}
						<div class="que-sta-jie">
							<span>已解</span>
							<span>&radic;</span>
						</div>
						{else /}
						<div class="que-sta-ask">
							<span>未解</span>
							<span >？</span>
						</div>
						{/if}
						<div class="que-sta-view layui-hide-xs">
							<span>{article:pv /}</span>
							<span >阅读</span>
						</div>
						<div class="que-body">
							<h2><a href="{article:url /}" >{article:title /}</a></h2>
							<div class="que-user-info">
								<a href="{article:user name='link'}" class="que-avatar">
									<cite>{article:author /}</cite>
								</a>
								{$article.create_time|date='Y-m-d'}
								{gt name="article.has_image" value="0"}
								'<span><i class="layui-icon layui-icon-picture" style="color: #5FB878;"></i></span>'
								{/gt}
								{$article.has_video ?= '<span><i class="layui-icon layui-icon-play" style="color: #FF5722;"></i></span>'}
								{$article.has_audio ?= '<span><i class="layui-icon layui-icon-speaker" style="color: #000000;"></i></span>'}
								
								<span ><i class="iconfont icon-pinglun1" title="回答"></i> {article:comments_num /}</span>
							</div>
						</div>
					</li>
					{/article:list}
				</ul>
			<div style="text-align: center" id="pages"></div>
			</div>
		</div>
		<div class="layui-col-md4">
			<!-- 插件hook位 -->

			{//热门标签}
			<div class="fly-panel layui-hide-xs">
				<div class="fly-panel-title">热门标签</div>
				<div class="fly-panel-main">
					<ul>
						{article:hotag}
						<li style="padding:10px;display:inline-block;height: 15px;"><a href="{$hotag.url}">{$hotag.name}</a></li>
						{/article:hotag}
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>
{include file="public/menu" /}

{/block}

{block name="script"}
<script>
    layui.use(['laypage'], function(){
	  var laypage = layui.laypage;

	  //执行一个laypage实例
	  laypage.render({
			elem: 'pages' //注意，这里的 test1 是 ID，不用加 # 号
			,count: "{$__LISTS__.total}" //数据总数，从服务端得到
			,groups: 1
			,limit: "{$__LISTS__['per_page']}"
			,curr : "{$__LISTS__['current_page']}"
			,first: false
    		,last: false
			,groups: 5
			,layout: ['prev', 'page','next','count', 'skip']
			//获取起始页
			,jump: function(obj, first){
				//首次不执行
				if(!first){
					window.location.href = '{$path}/'+obj.curr+'.html'; //跳转
				}
			}
	  	})
	});
</script>
{/block}